import '../../public.dart';

class HomeCategoryTabs extends StatelessWidget {
  const HomeCategoryTabs({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 60,
      color: Colors.white,
      child: ListView(
        scrollDirection: Axis.horizontal,
        padding: EdgeInsets.symmetric(horizontal: 16),
        children: [
          _buildTab('全部'),
          _buildTab('游戏'),
          _buildTab('购物'),
          _buildTab('娱乐'),
          _buildTab('工具'),
          _buildTab('社交'),
        ],
      ),
    );
  }

  Widget _buildTab(String text) {
    return Container(
      margin: EdgeInsets.only(right: 16),
      padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
      decoration: BoxDecoration(
        color: Colors.blue[50],
        borderRadius: BorderRadius.circular(20),
        border: Border.all(color: Colors.blue),
      ),
      child: Center(
        child: Text(
          text,
          style: TextStyle(
            color: Colors.blue,
            fontSize: 14,
            fontWeight: FontWeight.w500,
          ),
        ),
      ),
    );
  }
}